<script>
    //获取指定名称的cookie的值
    function getCookie(objName) {
        var arrStr = document.cookie.split("; ");
        for (var i = 0; i < arrStr.length; i++) {
            var temp = arrStr[i].split("=");
            if (temp[0] == objName) return unescape(temp[1]);
        }
    };
    // 未登录跳转到登录页面
    var token =  getCookie("_token") || localStorage.getItem("_token");
    if (!token) {
        location.href = "login_new.html";
    }
</script>